-- GENERATED SPELL FOR [Dreamroarer] --


function spell0_12497(pUnit, Event) --@Corrosive Acid Breath,n/a--
pUnit:FullCastSpellOnTarget(20667,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12497', 30000, 1)
end

function spell1_12497(pUnit, Event) --@Sleepwalk,n/a--
pUnit:FullCastSpellOnTarget(20668,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12497', 10264, 1)
end

function Sorts_12497(pUnit, Event)
local choix_sorts_12497 = math.random(0, 1)
if choix_sorts_12497 == 0 then
pUnit:RegisterEvent('spell0_12497', 1, 1)
end
if choix_sorts_12497 == 1 then
pUnit:RegisterEvent('spell1_12497', 1, 1)
end
end

function mob12497_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12497', math.random(1500, 3000), 1)
end

function mob12497_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12497_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12497_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12497, 1, 'mob12497_Action')
RegisterUnitEvent(12497, 2, 'mob12497_Leave')
RegisterUnitEvent(12497, 3, 'mob12497_Kill')
RegisterUnitEvent(12497, 4, 'mob12497_Die')
